# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>

pkgname=python-plumbum
_name=plumbum
pkgver=1.8.1
pkgrel=2
pkgdesc='A small yet feature-rich Python library for shell script-like programs, and more'
url='https://github.com/tomerfiliba/plumbum'
arch=('any')
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-hatch-vcs' 'python-hatchling' 'python-installer')
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha512sums=('80031c07be3b68767556bba8246e964c51b16336d6105ad3d51d62f7c39287af6f928be713171c8c22cdd37145a0e7c3bd65d44f14bf8b1bc62483b648f3acff')
b2sums=('91288c5f793b9e3e7d1e1d3724f5cc16989d604b1236438fc71283fab5aa59bb34f1742fe2d79b7a9220e09a3622f5145769497765f3f9213dc70960af478fa0')

build() {
  cd "${_name}-${pkgver}"
  python -m build --wheel --no-isolation
}

check() {
  cd "${_name}-${pkgver}"
  PYTHONPATH=. python -c 'import plumbum'
}

package() {
  cd "${_name}-${pkgver}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -D LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:set ts=2 sw=2 et:
